An Optimizing Compiler for CLP(R)
نویسندگان
چکیده
The considerable expressive power and exibility gained by combining constraint programming with logic programming is not without cost. Implementations of constraint logic programming (CLP) languages must include expensive constraint solving algorithms tailored to speciic domains, such as trees, Booleans, or real numbers. The performance of many current CLP compilers and interpreters does not encourage the widespread use of CLP. We outline an optimizing compiler for CLP(R), a CLP language which extends Prolog by allowing linear arithmetic constraints. The compiler uses sophisticated global analyses to determine the applicability of diierent program transformations. Two important components of the compiler, the analyzer and the optimizer, work in continual interaction in order to apply semantics-preserving transformations to the source program. A large suite of transformations are planned. Currently the compiler applies three powerful transformations , namely \solver bypass", \dead variable elimination" and \nofail constraint detection". We explain these optimizations and their place in the overall compiler design and show how they lead to performance improvements on a set of benchmark programs.
منابع مشابه
Effectiveness of Optimizing Compilation for CLP(R)
Constraint Logic Programming (CLP) languages extend logic programming by allowing constraints from diierent domains such as real numbers or Boolean functions. They have proved to be ideal for expressing problems that require interactive mathematical modelling and complex combinatorial optimization problems. However, CLP languages have mainly been considered as research systems, useful for rapid...
متن کاملComplete Solving of Linear Diophantine Equations and Inequations without Adding Variables
Debugging Constraint Programs p. 204 An Optimizing Compiler for CLP(R) p. 222 Local and Global Relational Consistency p. 240 Dynamic Variable Ordering in CSPs p. 258 A Unifying Framework for Tractable Constraints p. 276 On the Forward Checking Algorithm p. 292 A Confluent Calculus for Concurrent Constraint Programming with Guarded Choice p. 310 Situated Simplification p. 328 Guarded Constructiv...
متن کاملOptimizations of CLP ( < Lin )
This paper describes the design and implementation of an optimizing compiler for CLP(< Lin), a constraint logic programming language over linear real constraints. The compiler performs a number of source to source optimizations which aim at replacing constraint solving, the basic operation of the language, by assignments (when, at runtime, all but one variables have a xed value) and tests (when...
متن کاملSkeletons and Techniques for the Systematic Development of Constraint Logic Programs
We study the systematic development of Constraint Logic Programs from the viewpoint of Skeletons and Techniques as described by Kirschenbaum and Sterling. We describe a number of fundamental skeleton classes for CLP, and generalize the notion of skeletons to deal with non-structural recursion. Then we describe a range of useful techniques for extending these skeletons. Furthermore, we introduce...
متن کاملDesign and Implementation of Practical Constraint Logic Programming Systems
The Constraint Logic Programming (CLP) scheme, developed by Jaffar and Lassez, defines a class of rule–based constraint programming languages. These generalize traditional logic programming languages (like Prolog) by replacing the basic operational step, unification, with constraint solving. While CLP languages have a tremendous advantage in terms of expressive power, they must be shown to be a...
متن کامل